home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / tl / tl-num.elc.z / tl-num.elc
Emacs Compiled Lisp  |  1998-05-21  |  1.8 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
100% file Emacs/XEmacs v20 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 14 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 6a 75 73 74 69 6e 62 |piled by| justinb|
|00000020| 40 65 62 6f 6e 79 2e 63 | 72 61 79 2e 63 6f 6d 20 |@ebony.c|ray.com |
|00000030| 6f 6e 20 4d 6f 6e 20 4d | 61 72 20 20 39 20 31 32 |on Mon M|ar 9 12|
|00000040| 3a 35 35 3a 30 33 20 31 | 39 39 38 0a 3b 3b 3b 20 |:55:03 1|998.;;; |
|00000050| 66 72 6f 6d 20 66 69 6c | 65 20 2f 68 6f 6d 65 2f |from fil|e /home/|
|00000060| 61 73 70 65 6e 30 37 2f | 6a 75 73 74 69 6e 62 2f |aspen07/|justinb/|
|00000070| 72 6f 6f 74 73 2f 66 72 | 65 65 77 61 72 65 2f 78 |roots/fr|eeware/x|
|00000080| 65 6d 61 63 73 2f 32 30 | 2e 33 2f 78 65 6d 61 63 |emacs/20|.3/xemac|
|00000090| 73 2d 32 30 2e 33 2f 6c | 69 73 70 2f 74 6c 2f 74 |s-20.3/l|isp/tl/t|
|000000a0| 6c 2d 6e 75 6d 2e 65 6c | 0a 3b 3b 3b 20 65 6d 61 |l-num.el|.;;; ema|
|000000b0| 63 73 20 76 65 72 73 69 | 6f 6e 20 32 30 2e 34 20 |cs versi|on 20.4 |
|000000c0| 22 45 6d 65 72 61 6c 64 | 22 20 58 45 6d 61 63 73 |"Emerald|" XEmacs|
|000000d0| 20 20 4c 75 63 69 64 2e | 0a 3b 3b 3b 20 62 79 74 | Lucid.|.;;; byt|
|000000e0| 65 63 6f 6d 70 20 76 65 | 72 73 69 6f 6e 20 32 2e |ecomp ve|rsion 2.|
|000000f0| 32 35 20 58 45 6d 61 63 | 73 3b 20 32 32 2d 4d 61 |25 XEmac|s; 22-Ma|
|00000100| 72 2d 39 36 2e 0a 3b 3b | 3b 20 6f 70 74 69 6d 69 |r-96..;;|; optimi|
|00000110| 7a 61 74 69 6f 6e 20 69 | 73 20 6f 6e 2e 0a 3b 3b |zation i|s on..;;|
|00000120| 3b 20 74 68 69 73 20 66 | 69 6c 65 20 75 73 65 73 |; this f|ile uses|
|00000130| 20 6f 70 63 6f 64 65 73 | 20 77 68 69 63 68 20 64 | opcodes| which d|
|00000140| 6f 20 6e 6f 74 20 65 78 | 69 73 74 20 69 6e 20 45 |o not ex|ist in E|
|00000150| 6d 61 63 73 20 31 39 2e | 0a 0a 28 69 66 20 28 61 |macs 19.|..(if (a|
|00000160| 6e 64 20 28 62 6f 75 6e | 64 70 20 27 65 6d 61 63 |nd (boun|dp 'emac|
|00000170| 73 2d 76 65 72 73 69 6f | 6e 29 0a 09 20 28 6f 72 |s-versio|n).. (or|
|00000180| 20 28 61 6e 64 20 28 62 | 6f 75 6e 64 70 20 27 65 | (and (b|oundp 'e|
|00000190| 70 6f 63 68 3a 3a 76 65 | 72 73 69 6f 6e 29 20 65 |poch::ve|rsion) e|
|000001a0| 70 6f 63 68 3a 3a 76 65 | 72 73 69 6f 6e 29 0a 09 |poch::ve|rsion)..|
|000001b0| 20 20 20 20 20 28 73 74 | 72 69 6e 67 2d 6c 65 73 | (st|ring-les|
|000001c0| 73 70 20 65 6d 61 63 73 | 2d 76 65 72 73 69 6f 6e |sp emacs|-version|
|000001d0| 20 22 32 30 22 29 29 29 | 0a 20 20 20 20 28 65 72 | "20")))|. (er|
|000001e0| 72 6f 72 20 22 60 74 6c | 2d 6e 75 6d 2e 65 6c 27 |ror "`tl|-num.el'|
|000001f0| 20 77 61 73 20 63 6f 6d | 70 69 6c 65 64 20 66 6f | was com|piled fo|
|00000200| 72 20 45 6d 61 63 73 20 | 32 30 22 29 29 0a 0a 28 |r Emacs |20"))..(|
|00000210| 6f 72 20 28 62 6f 75 6e | 64 70 20 27 63 75 72 72 |or (boun|dp 'curr|
|00000220| 65 6e 74 2d 6c 6f 61 64 | 2d 6c 69 73 74 29 20 28 |ent-load|-list) (|
|00000230| 73 65 74 71 20 63 75 72 | 72 65 6e 74 2d 6c 6f 61 |setq cur|rent-loa|
|00000240| 64 2d 6c 69 73 74 20 6e | 69 6c 29 29 0a 0a 0a 28 |d-list n|il))...(|
|00000250| 62 79 74 65 2d 63 6f 64 | 65 20 22 c0 c1 21 88 c0 |byte-cod|e "..!..|
|00000260| c2 21 87 22 20 5b 72 65 | 71 75 69 72 65 20 65 6d |.!." [re|quire em|
|00000270| 75 20 74 6c 2d 73 65 71 | 5d 20 32 29 0a 23 40 36 |u tl-seq|] 2).#@6|
|00000280| 31 20 43 6f 6e 76 65 72 | 74 20 6e 20 62 61 73 65 |1 Conver|t n base|
|00000290| 20 63 68 61 72 61 63 74 | 65 72 20 43 48 52 20 74 | charact|er CHR t|
|000002a0| 6f 20 69 6e 74 65 67 65 | 72 20 28 6e 20 3c 3d 20 |o intege|r (n <= |
|000002b0| 33 36 29 2e 20 5b 74 6c | 2d 6e 75 6d 5d 1f 0a 28 |36). [tl|-num]..(|
|000002c0| 64 65 66 61 6c 69 61 73 | 20 27 6e 2d 63 68 61 72 |defalias| 'n-char|
|000002d0| 2d 74 6f 2d 69 6e 74 20 | 23 5b 28 63 68 72 29 20 |-to-int |#[(chr) |
|000002e0| 22 c0 09 58 ab 89 09 c2 | 58 ab 84 09 c0 5a 87 c3 |"..X....|X....Z..|
|000002f0| 09 58 ab 8b 09 c4 58 ab | 86 09 c3 5a c5 5c 5c 87 |.X....X.|...Z.\\.|
|00000300| c6 09 58 ad 8a 09 c7 58 | ad 85 09 c6 5a c5 5c 5c |..X....X|....Z.\\|
|00000310| 87 22 20 5b 3f 30 20 63 | 68 72 20 3f 39 20 3f 41 |." [?0 c|hr ?9 ?A|
|00000320| 20 3f 5a 20 31 30 20 3f | 61 20 3f 7a 5d 20 32 20 | ?Z 10 ?|a ?z] 2 |
|00000330| 28 23 24 20 2e 20 36 34 | 32 29 5d 29 0a 23 40 35 |(#$ . 64|2)]).#@5|
|00000340| 39 20 43 6f 6e 76 65 72 | 74 20 69 6e 74 65 67 65 |9 Conver|t intege|
|00000350| 72 20 4e 20 74 6f 20 6e | 20 62 61 73 65 20 63 68 |r N to n| base ch|
|00000360| 61 72 61 63 74 65 72 20 | 28 6e 20 3c 3d 20 33 36 |aracter |(n <= 36|
|00000370| 29 2e 20 5b 74 6c 2d 6e | 75 6d 5d 1f 0a 28 64 65 |). [tl-n|um]..(de|
|00000380| 66 61 6c 69 61 73 20 27 | 69 6e 74 2d 74 6f 2d 6e |falias '|int-to-n|
|00000390| 2d 63 68 61 72 20 23 5b | 28 6e 29 20 22 08 c1 57 |-char #[|(n) "..W|
|000003a0| ab 84 c2 08 5c 5c 87 c3 | 08 c1 5a 5c 5c 87 22 20 |....\\..|..Z\\." |
|000003b0| 5b 6e 20 31 30 20 3f 30 | 20 3f 41 5d 20 33 20 28 |[n 10 ?0| ?A] 3 (|
|000003c0| 23 24 20 2e 20 38 33 34 | 29 5d 29 0a 23 40 35 36 |#$ . 834|)]).#@56|
|000003d0| 20 43 6f 6e 76 65 72 74 | 20 6e 20 62 61 73 65 20 | Convert| n base |
|000003e0| 6e 75 6d 62 65 72 20 73 | 65 71 75 65 6e 63 65 20 |number s|equence |
|000003f0| 53 45 51 20 74 6f 20 6e | 75 6d 62 65 72 2e 20 5b |SEQ to n|umber. [|
|00000400| 74 6c 2d 6e 75 6d 5d 1f | 0a 28 64 65 66 61 6c 69 |tl-num].|.(defali|
|00000410| 61 73 20 27 62 61 73 65 | 2d 73 65 71 2d 74 6f 2d |as 'base|-seq-to-|
|00000420| 69 6e 74 20 23 5b 28 62 | 61 73 65 20 73 65 71 29 |int #[(b|ase seq)|
|00000430| 20 22 c0 c1 c2 0b 23 87 | 22 20 5b 66 6f 6c 64 6c | "....#.|" [foldl|
|00000440| 20 23 5b 28 6e 20 6d 29 | 20 22 08 09 5f 5c 6e 5c | #[(n m)| ".._\n\|
|00000450| 5c 87 22 20 5b 6e 20 62 | 61 73 65 20 6d 5d 20 32 |\." [n b|ase m] 2|
|00000460| 5d 20 30 20 73 65 71 5d | 20 34 20 28 23 24 20 2e |] 0 seq]| 4 (#$ .|
|00000470| 20 39 37 37 29 5d 29 0a | 23 40 35 34 20 43 6f 6e | 977)]).|#@54 Con|
|00000480| 76 65 72 74 20 6e 20 62 | 61 73 65 20 63 68 61 72 |vert n b|ase char|
|00000490| 20 73 65 71 75 65 6e 63 | 65 20 53 45 51 20 74 6f | sequenc|e SEQ to|
|000004a0| 20 6e 75 6d 62 65 72 2e | 20 5b 74 6c 2d 6e 75 6d | number.| [tl-num|
|000004b0| 5d 1f 0a 28 64 65 66 61 | 6c 69 61 73 20 27 62 61 |]..(defa|lias 'ba|
|000004c0| 73 65 2d 63 68 61 72 2d | 73 65 71 2d 74 6f 2d 69 |se-char-|seq-to-i|
|000004d0| 6e 74 20 23 5b 28 62 61 | 73 65 20 73 65 71 29 20 |nt #[(ba|se seq) |
|000004e0| 22 c0 c1 c2 0b 23 87 22 | 20 5b 66 6f 6c 64 6c 20 |"....#."| [foldl |
|000004f0| 23 5b 28 6e 20 63 68 72 | 29 20 22 08 09 5f c2 0b |#[(n chr|) ".._..|
|00000500| 21 5c 5c 87 22 20 5b 6e | 20 62 61 73 65 20 6e 2d |!\\." [n| base n-|
|00000510| 63 68 61 72 2d 74 6f 2d | 69 6e 74 20 63 68 72 5d |char-to-|int chr]|
|00000520| 20 33 5d 20 30 20 73 65 | 71 5d 20 34 20 28 23 24 | 3] 0 se|q] 4 (#$|
|00000530| 20 2e 20 31 31 34 39 29 | 5d 29 0a 23 40 34 37 20 | . 1149)|]).#@47 |
|00000540| 43 6f 6e 76 65 72 74 20 | 68 65 78 20 63 68 61 72 |Convert |hex char|
|00000550| 61 63 74 65 72 20 43 48 | 52 20 74 6f 20 6e 75 6d |acter CH|R to num|
|00000560| 62 65 72 2e 20 5b 74 6c | 2d 6e 75 6d 5d 1f 0a 28 |ber. [tl|-num]..(|
|00000570| 64 65 66 61 6c 69 61 73 | 20 27 68 65 78 2d 63 68 |defalias| 'hex-ch|
|00000580| 61 72 2d 74 6f 2d 6e 75 | 6d 62 65 72 20 23 5b 28 |ar-to-nu|mber #[(|
|00000590| 63 68 72 29 20 22 c0 09 | 58 ab 89 09 c2 58 ab 84 |chr) "..|X....X..|
|000005a0| 09 c0 5a 87 c3 09 58 ab | 8b 09 c4 58 ab 86 09 c3 |..Z...X.|...X....|
|000005b0| 5a c5 5c 5c 87 c6 09 58 | ad 8a 09 c7 58 ad 85 09 |Z.\\...X|....X...|
|000005c0| c6 5a c5 5c 5c 87 22 20 | 5b 3f 30 20 63 68 72 20 |.Z.\\." |[?0 chr |
|000005d0| 3f 39 20 3f 41 20 3f 46 | 20 31 30 20 3f 61 20 3f |?9 ?A ?F| 10 ?a ?|
|000005e0| 66 5d 20 32 20 28 23 24 | 20 2e 20 31 33 34 34 29 |f] 2 (#$| . 1344)|
|000005f0| 5d 29 0a 28 64 65 66 61 | 6c 69 61 73 20 27 6e 75 |]).(defa|lias 'nu|
|00000600| 6d 62 65 72 2d 74 6f 2d | 68 65 78 2d 63 68 61 72 |mber-to-|hex-char|
|00000610| 20 27 69 6e 74 2d 74 6f | 2d 6e 2d 63 68 61 72 29 | 'int-to|-n-char)|
|00000620| 0a 23 40 35 34 20 43 6f | 6e 76 65 72 74 20 68 65 |.#@54 Co|nvert he|
|00000630| 78 20 6e 75 6d 62 65 72 | 20 73 65 71 75 65 6e 63 |x number| sequenc|
|00000640| 65 20 53 45 51 20 74 6f | 20 69 6e 74 65 67 65 72 |e SEQ to| integer|
|00000650| 2e 20 5b 74 6c 2d 6e 75 | 6d 5d 1f 0a 28 64 65 66 |. [tl-nu|m]..(def|
|00000660| 61 6c 69 61 73 20 27 68 | 65 78 2d 73 65 71 2d 74 |alias 'h|ex-seq-t|
|00000670| 6f 2d 69 6e 74 20 23 5b | 28 73 65 71 29 20 22 c0 |o-int #[|(seq) ".|
|00000680| c1 5c 6e 5c 22 87 22 20 | 5b 62 61 73 65 2d 73 65 |.\n\"." |[base-se|
|00000690| 71 2d 74 6f 2d 69 6e 74 | 20 31 36 20 73 65 71 5d |q-to-int| 16 seq]|
|000006a0| 20 33 20 28 23 24 20 2e | 20 31 35 37 34 29 5d 29 | 3 (#$ .| 1574)])|
|000006b0| 0a 23 40 35 32 20 43 6f | 6e 76 65 72 74 20 68 65 |.#@52 Co|nvert he|
|000006c0| 78 20 63 68 61 72 20 73 | 65 71 75 65 6e 63 65 20 |x char s|equence |
|000006d0| 53 45 51 20 74 6f 20 69 | 6e 74 65 67 65 72 2e 20 |SEQ to i|nteger. |
|000006e0| 5b 74 6c 2d 6e 75 6d 5d | 1f 0a 28 64 65 66 61 6c |[tl-num]|..(defal|
|000006f0| 69 61 73 20 27 68 65 78 | 2d 63 68 61 72 2d 73 65 |ias 'hex|-char-se|
|00000700| 71 2d 74 6f 2d 69 6e 74 | 20 23 5b 28 73 65 71 29 |q-to-int| #[(seq)|
|00000710| 20 22 c0 c1 5c 6e 5c 22 | 87 22 20 5b 62 61 73 65 | "..\n\"|." [base|
|00000720| 2d 63 68 61 72 2d 73 65 | 71 2d 74 6f 2d 69 6e 74 |-char-se|q-to-int|
|00000730| 20 31 36 20 73 65 71 5d | 20 33 20 28 23 24 20 2e | 16 seq]| 3 (#$ .|
|00000740| 20 31 37 31 38 29 5d 29 | 0a 28 70 72 6f 76 69 64 | 1718)])|.(provid|
|00000750| 65 20 27 74 6c 2d 6e 75 | 6d 29 0a |e 'tl-nu|m). |
+--------+-------------------------+-------------------------+--------+--------+